package com.project.controller;

import com.project.bean.TicketBean;
import com.project.service.ITicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("ticket")
public class TickerController {
    @Autowired
    private ITicketService ticketService;
    @GetMapping("getTicketByStatus")
    public List<TicketBean> getTicketByStatus(@RequestParam("status")String status) {
        return ticketService.getTicketByStatus(status);
    }


}
